// The payment page
// ================

define(['zepto', 'utils', 'wxpay', 'wxshare', 'sui'], function($, utils, wxpay, wxshare) {
  return {

    init: function(data) {
      
      // forbidden wx share
      wxshare.initShare(data.jsConfig, false)
      
      this.orderId = parseInt(data.orderId)
      this.onWxBtnClick()
    },
    
    /**
     * Bind handler on clicking wx payment button
     */
    onWxBtnClick: function(orderId) {
      var that = this
      $('#wx-pay').on("click", function(e) {
        e.preventDefault()
        that.requestWxPay()
      }) 
    },

    
  }
})